<?php
set_time_limit(0);
$commonProtocol = getprotobyname('tcp');
$socket = socket_create(AF_INET, SOCK_STREAM, $commonProtocol);
socket_bind($socket, 'localhost', 1337);
socket_listen($socket);
// Accept any incoming connections to the server
$buffer = "NO DATA";
while(true)
{
 // Accept any connections coming in on this socket

 $connection = socket_accept($socket);
  
} 
?>